package com.kaiwukj.android.ufamily.mvp.http.entity.result;

import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseBean;

import java.text.DecimalFormat;
import java.util.List;

public class ServiceResult extends BaseBean {

    private Integer id;
    private Integer parentId;
    private String serviceName;
    private String label;
    private String serviceAliasName;
    private String thumbnail;
    private String carImg;
    private Integer providerNum;
    private List<ServiceInfo> serviceParamList;

    public ServiceResult() {
    }

    public ServiceResult(Integer id, String serviceName) {
        this.id = id;
        this.serviceName = serviceName;
        this.label = serviceName;
    }


    public ServiceResult(Integer id, Integer parentId, String serviceName) {
        this.id = id;
        this.parentId = parentId;
        this.serviceName = serviceName;
        this.label = serviceName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getServiceAliasName() {
        return serviceAliasName;
    }

    public void setServiceAliasName(String serviceAliasName) {
        this.serviceAliasName = serviceAliasName;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getCarImg() {
        return carImg;
    }

    public void setCarImg(String carImg) {
        this.carImg = carImg;
    }

    public Integer getProviderNum() {
        return providerNum == null ? 0 : providerNum;
    }

    public void setProviderNum(Integer providerNum) {
        this.providerNum = providerNum;
    }

    public List<ServiceInfo> getServiceParamList() {
        return serviceParamList;
    }

    public void setServiceParamList(List<ServiceInfo> serviceParamList) {
        this.serviceParamList = serviceParamList;
    }

    public static class ServiceInfo extends BaseBean {
        private Double charges;
        private String parameterName;
        private Double doorToDoorFee;
        private Integer pid;
        private Integer providerNum;
        private Integer id;


        public Double getDoorToDoorFee() {
            return doorToDoorFee;
        }

        public void setDoorToDoorFee(Double doorToDoorFee) {
            this.doorToDoorFee = doorToDoorFee;
        }

        public Double getCharges() {
            return charges;
        }

        public String getChargesStr() {
            DecimalFormat df = new DecimalFormat("#.##");
            return df.format(getCharges());
        }

        public void setCharges(Double charges) {
            this.charges = charges;
        }

        public String getParameterName() {
            return parameterName;
        }

        public void setParameterName(String parameterName) {
            this.parameterName = parameterName;
        }


        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public Integer getPid() {
            return pid;
        }

        public void setPid(Integer pid) {
            this.pid = pid;
        }

        public Integer getProviderNum() {
            return providerNum;
        }

        public void setProviderNum(Integer providerNum) {
            this.providerNum = providerNum;
        }

    }

}
